<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Cadastro de Funcionarios</title>
	<h:outputStylesheet library="css" name="estilo.css"></h:outputStylesheet>
</h:head>
<h:body>
<ui:include src="/painel.xhtml"></ui:include>
	<h:form id="funcionario" >
		<p:panel header="Cadastro de Funcionarios" >
			
			<h:panelGrid columns="2">
			
				<h:outputText value="Nome: " />
				<p:inputText value="#{funcMB.funcionario.nome}" />
				
				<h:outputText value="Salario: " />
				<p:inputText value="#{funcMB.funcionario.salario}" />
						
				<h:outputText value="Login: " />
				<p:inputText value="#{funcMB.usuario.login}" />
				
				<h:outputText value="Senha: " />
				<p:inputText value="#{funcMB.usuario.senha}" />
			
			</h:panelGrid>
			<br />
			<p:separator></p:separator>
			<br />
			<h:commandButton value="Cadastrar" action="#{funcMB.cadastrar}" update="@funcionario, growl"/>
			<br /><br />
			<p:growl showDetail="true" showSummary="true" id="growl" />
			<h:message for="funcionario" styleClass="message"/>
		
		</p:panel>
	</h:form>
	
</h:body>

</html>